package cn.stylefeng.guns.modular.business.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;

import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 订单明细
 * </p>
 *
 * @author jwj
 * @since 2019-07-12
 */
@TableName("c_order_item")
@Data
public class OrderItem implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "order_item_id", type = IdType.AUTO)
    private Integer orderItemId;

    /**
     * 订单主体id
     */
    @TableField("order_id")
    private Integer orderId;

    /**
     * 卡号
     */
    @TableField("card_no")
    private String cardNo;

    /**
     * 卡密
     */
    @TableField("card_password")
    private String cardPassword;

    @TableField("type_id")
    private Integer typeId;

    @TableField("type_name")
    private String typeName;

    @TableField("card_type_id")
    private Integer cardTypeId;

    @TableField("card_type_name")
    private String cardTypeName;

    @TableField("card_cataory_id")
    private Long cardCataoryId;

    @TableField("card_cataory_name")
    private String cardCataoryName;

    @TableField("card_quota_id")
    private Integer cardQuotaId;

    @TableField("card_quota_name")
    private String cardQuotaName;

    /**
     * 支付金额
     */
    @TableField("amount")
    private BigDecimal amount;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;

    /**
     * 是否删除
     */
    @TableField("delete_flag")
    private Integer deleteFlag;

    /**
     * 提交面值
     */
    @TableField("sub_quota")
    private Integer subQuota;

    /**
     * 订单面值
     */
    @TableField("item_quota")
    private Integer itemQuota;



    @Override
    public String toString() {
        return "OrderItem{" +
        "orderItemId=" + orderItemId +
        ", orderId=" + orderId +
        ", cardNo=" + cardNo +
        ", cardPassword=" + cardPassword +
        ", typeId=" + typeId +
        ", typeName=" + typeName +
        ", cardTypeId=" + cardTypeId +
        ", cardTypeName=" + cardTypeName +
        ", cardCataoryId=" + cardCataoryId +
        ", cardCataoryName=" + cardCataoryName +
        ", cardQuotaId=" + cardQuotaId +
        ", cardQuotaName=" + cardQuotaName +
        ", amount=" + amount +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        ", delFlag=" + deleteFlag +
        "}";
    }
}
